package com.weimei.conversionTreasure.activity;

import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;

import android.os.Bundle;

import com.weimei.conversionTreasure.BR;
import com.weimei.conversionTreasure.R;
import com.weimei.conversionTreasure.app.AppViewModelFactory;
import com.weimei.conversionTreasure.databinding.ActivitySetBinding;
import com.weimei.conversionTreasure.viewModel.SetVM;

import me.goldze.mvvmhabit.base.BaseActivity;

public class SetActivity extends BaseActivity<ActivitySetBinding, SetVM> {

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_set;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }


    @Override
    public SetVM initViewModel() {
        AppViewModelFactory factory = AppViewModelFactory.getInstance(getApplication());
        return ViewModelProviders.of(this, (ViewModelProvider.Factory) factory).get(SetVM.class);
    }
}